<template>
  <table v-show="list && list.length > 0" class="table table-bordered table-hover">
    <caption>首页Banner</caption>
    <thead>
      <tr>
        <th class="col-xs-1">ID</th>
        <th class="col-xs-2">配图</th>
        <th class="col-xs-1">跳转类型</th>
        <th class="col-xs-3">跳转地址</th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="it in list">
        <td>
          {{it.id}}
        </td>
        <td v-if="it.picUrl ">
          <img class="pic" :src="it.picUrl">
        </td>
        <td>{{+it.type ===1 ? '跳转大咖说' : '跳转网页' }}</td>
        <td>{{it.jumpUrl}}</td>
        <td class="col-nowrap text-right">
          <button class="btn btn-sm btn-danger" @click="deleteItem(it.id)">删除</button>
        </td>
      </tr>
    </tbody>
  </table>
  <vue-pages :pages.sync="pages" :get-list="getList"></vue-pages>
  <vue-uploader v-ref:uploader></vue-uploader>
</template>
<style src="./item-list.css" scoped></style>
<script src="./item-list.js"></script>